package ro.prjmanager.core.list;

import javax.servlet.ServletRequest;


public class RequestParamList {
    private String sord;
    private String searchOper;
    private String searchString;
    private int page;
    private String classModel;
    private long nd;
    private String searchField;
    private String sidx;
    private int rows;
    private boolean search;
    private String selectorName;
    private ServletRequest request;
    private String methName;


    public RequestParamList(ServletRequest request) {
        this.sord = request.getParameter("sord");
        this.searchOper = request.getParameter("searchOper");
        this.searchString = request.getParameter("searchString");
        if (request.getParameter("page") != null)
            this.page = Integer.valueOf(request.getParameter("page"));
        else this.page = 0;
        this.classModel = request.getParameter("classModel");
        if (request.getParameter("nd") != null)
            this.nd = Long.valueOf(request.getParameter("nd"));
        this.searchField = request.getParameter("searchField");
        this.sidx = request.getParameter("sidx");
        if (request.getParameter("rows") != null)
            this.rows = Integer.valueOf(request.getParameter("rows"));
        if (request.getParameter("_search") != null)
            this.search = Boolean.valueOf(request.getParameter("_search"));
        if(request.getParameter("selectorName")!=null)
            this.selectorName=request.getParameter("selectorName");
        this.request=request;
        this.methName=request.getParameter("meth");

    }

    public String getSord() {
        return sord;
    }

    public void setSord(String sord) {
        this.sord = sord;
    }

    public String getSearchOper() {
        return searchOper;
    }

    public void setSearchOper(String searchOper) {
        this.searchOper = searchOper;
    }

    public String getSearchString() {
        return searchString;
    }

    public void setSearchString(String searchString) {
        this.searchString = searchString;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public String getClassModel() {
        return classModel;
    }

    public void setClassModel(String classModel) {
        this.classModel = classModel;
    }

    public long getNd() {
        return nd;
    }

    public void setNd(long nd) {
        this.nd = nd;
    }

    public String getSearchField() {
        return searchField;
    }

    public void setSearchField(String searchField) {
        this.searchField = searchField;
    }

    public String getSidx() {
        return sidx;
    }

    public void setSidx(String sidx) {
        this.sidx = sidx;
    }

    public int getRows() {
        return rows;
    }

    public void setRows(int rows) {
        this.rows = rows;
    }

    public boolean isSearch() {
        return search;
    }

    public void setSearch(boolean search) {
        this.search = search;
    }

    public String getSelectorName() {
        return selectorName;
    }

    public void setSelectorName(String selectorName) {
        this.selectorName = selectorName;
    }

    public ServletRequest getRequest() {
        return request;
    }

    public void setRequest(ServletRequest request) {
        this.request = request;
    }

    public String getMethName() {
        return methName;
    }

    public void setMethName(String methName) {
        this.methName = methName;
    }
}
